﻿    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:SharpMap.Wpf"

    xmlns:pres="clr-namespace:SharpMap.Presentation.Wpf;assembly=SharpMap.Presentation.Wpf"
    xmlns:prim="clr-namespace:SharpMap.Wpf.Primitives"
    xmlns:ctrls="clr-namespace:SharpMap.Presentation.Wpf.Controls;assembly=SharpMap.Presentation.Wpf">
    <Style TargetType="{x:Type local:MapControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:MapControl}">
                    <ControlTemplate.Resources>
                        <ResourceDictionary>
                            <ResourceDictionary.MergedDictionaries>
                                <ResourceDictionary Source="/SharpMap.Wpf;component/Resources/Storyboards.xaml"/>
                            </ResourceDictionary.MergedDictionaries>
                        </ResourceDictionary>
                    </ControlTemplate.Resources>
                    <Border 
                        BorderThickness="{TemplateBinding Border.BorderThickness}" 
                        BorderBrush="{TemplateBinding Border.BorderBrush}" 
                        Background="{TemplateBinding Panel.Background}" 
                        VerticalAlignment="{TemplateBinding VerticalAlignment}" 
                        HorizontalAlignment="{TemplateBinding HorizontalAlignment}" 
                        Name="Bd" SnapsToDevicePixels="True">
                        <Grid x:Name="_mainGrid" ShowGridLines="True">
                           
                            <pres:MapView x:Name="PART_DefaultMapView"/>
                                <ItemsPresenter/>
                            

                    
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        
      <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate >
                    <!--<pres:MapView IsItemsHost="True" x:Name="PART_MapViewPanel" 
                        DataContext="{Binding }"
                        Map="{Binding Map}"/>-->
                    <Grid IsItemsHost="True"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>


<!--<Border Height="{x:Static SystemParameters.SmallIconHeight}"
                                    VerticalAlignment="Top"
                                       Style="{StaticResource FadeInOnHover}" Opacity="0.0">
    <Rectangle x:Name="PART_EmbededToolBar" Height="{x:Static SystemParameters.IconHeight}" 
                                               Fill="{x:Static SystemColors.ControlBrush}"/>
</Border>

<Border x:Name="_infoBorder" 
                                    VerticalAlignment="Bottom" Opacity="0" Margin="0,0,0,0"  
		                            Background="#7F000000" Padding="5,5,5,5"
                                    Style="{StaticResource FadeInOnHover}">
    <WrapPanel Height="Auto" x:Name="PART_InfoPanel">
        <Rectangle Height="{x:Static SystemParameters.IconHeight}" 
                                               Fill="PaleGreen"/>
    </WrapPanel>
</Border>-->